
#ifndef __REVENG_THREADWIN32_HPP__
#define __REVENG_THREADWIN32_HPP__

#include "WinHeader.h"
#include <RevEng/IThread.hpp>

namespace RevEng
{
	struct ThreadCall
	{
		IThreaded *Threaded;
		void *Param;

		ThreadCall();
	};

	class ThreadWin32 : public IThread
	{
	private:
		DWORD m_hThreadID;
		HANDLE m_hThread;
		Enum m_eStatus;
		ThreadCall m_tcCall;

	public:
		ThreadWin32();
		virtual ~ThreadWin32();
		virtual void Start(void* Param);
		virtual void Wait();
		virtual void Abort();
		virtual void SetThreaded(IThreaded *Threaded);
		virtual Enum GetStatus() const;
		virtual Int32 GetExitCode() const;
	};


	inline ThreadCall::ThreadCall() : Threaded(NULL), Param(NULL)
	{
	}
}

#endif	//__REVENG_THREADWIN32_HPP__
